<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>新峰Test</title>
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script src="https://unpkg.com/vue@2/dist/vue.js"></script>
    <!-- import JavaScript -->
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
    <script src="../js/index.js"></script>
</head>
<body>
<div id="hh">
    <el-row>
        <el-button type="primary" class=el-icon-circle-plus @click="drawer=true">添加</el-button>
        <el-button type="primary" class="el-icon-s-opportunity" @click="GetAll()">查询</el-button>
    </el-row>
    <el-drawer
            title="我是标题"
            :visible.sync="drawer"
            :with-header="false">
        <p>添加用户</p>
        <el-form>
            <el-form-item label="用户名称">
                <el-input v-model="User"></el-input>
            </el-form-item>
            <el-form-item label="密码">
                <el-input v-model="APssWord"></el-input>
            </el-form-item>
            <template>
                <el-select v-model="Choose_Value" clearable placeholder="请选择">
                    <el-option
                            v-for="item in Option"
                            :key="item.lable"
                            :label="item.lable"
                            :value="item.value">
                    </el-option>
                </el-select>
            </template>
        </el-form>

        <el-row>
            <el-button type="primary" @click="InserUser">添加</el-button>
            <el-button type="primary" @click="drawer=false">取消</el-button>
        </el-row>
    </el-drawer>
    <el-dialog :visible.sync="Enter">
        <el-form :model="ChooseRow">
            <el-form-item label="用户名称">
                <el-input v-model="ChooseRow.Thename"></el-input>
            </el-form-item>
            <el-form-item label="密码">
                <el-input v-model="ChooseRow.APassWord"></el-input>
            </el-form-item>
            <el-form-item label="会员等级">
                <template>
                    <el-select v-model="ChooseRow.Choose" clearable :placeholder="ChooseRow.Super?'超级用户':'普通用户'">
                        <el-option
                                v-for="item in Option"
                                :key="item.lable"
                                :label="item.lable"
                                :value="item.value">
                        </el-option>
                    </el-select>
                </template>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="UpData()">更改</el-button>
                <el-button type="primary" @click="Enter=false">取消</el-button>
            </el-form-item>
        </el-form>
    </el-dialog>

    <template>
        <el-table :data="tableData" style="width: 100%">
            <el-table-column prop="Id" label="号码" width="180">

            </el-table-column>
            <el-table-column prop="Thename" label="姓名" width="180">

            </el-table-column>
            <el-table-column prop="Super" label="会员等级">

            </el-table-column>
            <el-table-column prop="APassWord" label="用户密码">
            </el-table-column>
            <el-table-column label="操作">
                <template slot-scope="scope">
					<el-row>
						<el-button type="primary" @click="UpRow(scope.row)">编辑</el-button>
					</el-row>
                    <el-row>
						 <el-button type="primary" >删除</el-button>
					</el-row>
                   
                </template>

            </el-table-column>
        </el-table>
    </template>
</div>


</body>
</html>